package com.emip.service;

import java.util.List;

import com.emip.bean.AlarmConfigBean;
import com.emip.bean.RoleBean;
import com.emip.bean.SiteBean;
import com.emip.bean.UserBean;

public interface UserService {
	public UserBean login(String id,String password);
	public List<UserBean> getAll();
	public UserBean getUserByID(String id);
	public UserBean addUser(String id, String name, String password, 
			RoleBean role, String mobilePhone, String mailAddress, 
			String flag, String smsFlag, String controllFlag, String smtp, 
			String emailAccount, String emailPassword, AlarmConfigBean alarm,
			double longitude, double latitude, int mapZoom);
	public UserBean updateUser(String id, String name, String password,
			RoleBean role, String mobilePhone, String mailAddress, 
			String flag, String smsFlag, String controllFlag, String smtp, 
			String emailAccount, String emailPassword, AlarmConfigBean alarm,
			double longitude, double latitude, int mapZoom);
	public UserBean updateUserSimple(String id, String name, String mobilePhone, String mailAddress, 
			double longitude, double latitude, int mapZoom);
	
	public Boolean deleteUser(String id);
	
	//获取与user相关的sites
	public List<SiteBean> getUserSites(String userid);
	//设置用户与site的关联
	public boolean setUserSites(String userID, String[] siteIDs);
	
	//判断帐号与密码是否匹配
	public boolean isUserPwd(String userID, String pwd);
	//修改密码
	public UserBean updateUserPwd(String userID, String newPwd);
}
